import { createMemoryHistory, createRouter } from 'vue-router'

import HomeView from '@/views/Home.vue'
import AboutView from '@/views/About.vue'

const routes = [
  { path: '/', component: HomeView },
  { path: '/about', component: AboutView },
]

export default createRouter({
  //history：它会完全忽略浏览器的URL而使用其自已内部的URL
  history: createMemoryHistory(),
  routes,
})